package com.hubei.car.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * 第三方用户信息实体类
 * @author luokangtao
 * @create 2019-09-03 14:24
 */
@Data
@ApiModel("第三方用户信息实体类")
@TableName(value = "car_applet_user")
public class CarThirdUser implements Serializable {

    @TableId(value = "id", type = IdType.AUTO)
    @ApiModelProperty(value="id")
    private Long id;

    @TableField(value = "aliasname")
    @ApiModelProperty(value="用户昵称")
    private String aliasname;

    @TableField(value = "avatarurl")
    @ApiModelProperty(value="用户头像地址")
    private String avatarurl;

    @TableField(value = "sex")
    @ApiModelProperty(value="用户性别")
    private String sex;

    @TableField(exist = false)
    @ApiModelProperty(value="用户认证 后台生成的token")
    private String token;

    @TableField(value = "openid")
    @ApiModelProperty(value="用户第三方id 代表用户唯一身份的ID")
    private String openid;

    @TableField(value = "relation_id")
    @ApiModelProperty(value="关联用户帐号id")
    private String relationId;

    @TableField(value = "create_time")
    @ApiModelProperty(value="创建时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private LocalDateTime createTime;

    @TableField(value = "roles")
    @ApiModelProperty(value = "角色:0:普通(common) 1:管理员 (admin) 2:超级管理员(superadmin)")
    private String roles;

    @TableField(value = "real_name")
    @ApiModelProperty(value = "真实姓名")
    private String realName;

    @TableField(value = "mobile")
    @ApiModelProperty(value = "手机号码")
    private String mobile;

    @TableField(value = "address")
    @ApiModelProperty(value = "收货地址")
    private String address;

    @TableField(value = "ms_product_id")
    @ApiModelProperty(value = "最爱的产品id")
    private Long msProductId;

    @TableField(exist = false)
    @ApiModelProperty(value = "最爱的产品名称")
    private String msProductName;

    @TableField(value = "isstop")
    @ApiModelProperty(value="是否禁用")
    private Boolean isstop;
}
